swap in some of the logic from the hammer to solve tool issue