fixed a refactor