added ifthen;