adding head support and refactoring get
adding comments
adding option support
fixing typos