refactored used_ids and selected_ids
removed extra scopes on host
before demo
mismatches by loc/org