remove dump
new implementation
use the result of getRefBeforePut