refactor & comments