use an array-map
use atoms for a more imperative gameloop (also sort results)