implement new functions definitions of quick sort algorithm