fixed callback for sample31