added debugging to nextmap