finished merte sort