stacks: converted from object to class