changed api.py for dropdown