rewriting to use number for number in number, etc