Improved Code For MMY Task