hate the code but it works start to refactor now