make_handle and make_shared_handle functions