made the @courses available through a helper method so that it doesn't have to be mentioned in every controller