sample code cleanup