api routes are corrected