updated heapsort, added sift function