refactor required