simplifying and cleaning up