create and update event fixes, quick sort return condition removed, now it always iterates until only one element is left