add mersort in arraylist class