everything works except the if check
everything works except the if check