initialized work to zero for 'I'