fixing routes, adding api routes