clean up sample code for a little more clarity