clean up and comments
added not function