refactory for dynamic repositories fetch