cleaning up code and usage