add async code to examples