moving some logic around to put all updates under dispatch from the map object