Added sample codes

Learning implementation from dotinstall.