some calculations hacked in horribly