fixing and refoactoring change student state