some sample codes