started fixing heap