Finally working exam scheduler