refactored findFreeTimes, see psuedocode for general flow