reduced use of stack