Implemented the stack