refactor, address comments