nice refactor