stack with max operation