add imports and more advanced condition