created routes for api (on /api)