John went on a bike ride to the store 4 miles away. If it took John 310 of an hour to get there and 12 of an hour to get back, what was his average rate of speed (miles per hour) for the entire trip?