partition around first and second elements is added