Add elem and quicksort