changed sample code to work with 1.6