playing with shared pointers and helper functions