faster version with reg! in denominator