adressed comments
cleaned edit code snippet