refactor auer deterministic algorithm