Implement stack.