calculations are correct

config to best use of conditions