refactoring (fixed, woops)