refactor, works