Ham update with magic formula