added comments and other changes made in alamode