fixed, refactored