fix refactor