convert long calcs to shorter integers