You should use the same if construction as with the imptuation to catch the teruncode