rename reducder to indexmap and make it instanciable.