added comments
cleaned up