changing lastStr to mlast