wrote url router for the api