ideas and sample codes