fixed refactored