todo, fix shared pointer and type