cast smartpointers to higher level class