move ptr to templates