stack mechanism class