added return Mth from last element method