added then on if