added simple API to handle requests