added getters for M and N