updated sample according new callback in sdk