fixes map updating; adds outputting of stats