working on simplifying my code by taking out nested routes