multiplicity function edited (for cases when n == 0, (2, 0) fixed and tests addes