another attempt at two stacks