clean up and tests