add macros for flow control