Created  a stack class to manage stacks