Tested different code from modified from slides and now it works again