finalize ajax with taking courses