In if condition previously it was wrongly checking using assign sign, it should be ==