remove commented out code
docs and error handling