Wrote async version of client code