implemented parseCondition method