clean up sample code