Implemented heap operations