added some handlers and API controller