implement quick sort in Erlang