write some sample codes