changed api routes to include ".json" in endpoint