refactor requires