Updated Sample with additional callback