i did it wildly out of order. i was just focused on exploring and catching new pokemon. i did two gyms (2nd and 3rd), the second team star then did the steel titan. after finding out you get new abilities on titan pokemon i focused on getting them all first. then i did the rest of the gyms, and later team star.