made API endpoints more REST-like