max_heap ugly solution is finished