add typeid and smart pointer