initial heap code