cleaning up and error checking