adding example code for async methods in the controller