clean up of sample code