changed code to work for precomputed initial maps