move he assignment to the above line so just the check is in the if statement.