remove duplication from Users & Courses helpers