first phase done; generates correct output maps