tried global flags...close but not quite