if and if else working