address comments
refactor