refactored, fixed