refactor, simplify