create stack for concurrent if-statement