sample code for tutorials