cleaning up and simplifying things