a simple heap sort