Account number accumulation function reimplemented