redone routes and if statements better