Automatic stack operation