more code for sample export