Implemented constructor, getM & getN