cleaned up sample code a bit