working onclick for course