separated stack operations into separate C file