another powerful refactor