it builds a stack