implemented heapsort
removed code from 281 proj2