Changed from chunk reference to distance