changes from branch flow_serial
add extra logic, in case users forget to use new keyword