sample codes to study