Improve the code for Condition