set initial n to 1