added non recursive quick sort