added assignment B - heap implementation