setup controller to deal with API response