add velocity hook, add debug config for map
up to 4.0