Working on optimizing the if condition.