"creating stack functions, about to write header function and getbits function"