added sample code for reference