refactor & simplify