sample code with tips