change condition to inline