cleaning up, adding tests