cleaning up and documentation