Implemented a stack