wrote tests, clean up