clean up and comments added