Better sample code