flag handling style change