Broke out createDiff function