code for course work (4 course)