The order of the words in a Japanese sentence
1) あべさんは 友達と 美術館に いきました。
2) あべさんは 美術館に 友達と いきました。
Is there a real difference between these two sentences? In the book the first sentence is given as correct. I know that the subject stands for the first place in a sentence and a verb in the end. But what about the middle?