easy way to write stack.