fixed some code that was not needed