Abstract getting course and location into one method