tidy allflag code for use  at WWX2014