cleaned up comments and removed cout statements