Event manager homework. Left few bugs