Refactor ost selection