[Felix] implemented if else logic.