tried to clean up code

does not work