adds comments and cleanliness
refactor