change if logic