storing as shared ptrs instead of bare ones