fixing comments
minor fixes
changed the API