calling program adjustments
prevent overflow when multiplying nx by ny