Fix sample from alpha-1.0.5

Add await/async key word
Re-organize code