fixing refactor