added comments cleaned up