solution to problem in Advanced Accounts - "SHUKLA" (1992)