Modified API route