added smartptr code
removed unused include statement