now have implemented the stack