removed flag stuff