add else to set the variable