Added int calculation. Not tested.