refactored but cant get to work