registration working automatically for valid courses