improve buildRelativeCondition