stack with classes