Adding updated code of If Else