add stack and tests