minor modification
upload heap implementation