fixing map bug, debug print statements