Switched to limit and HashMap, problems with determinism