add two condition for checking value