fixed conditional statement