refactor share retrieval