issue-2 change declarations to use shared_ptr