refactored fslogic's condition