changing if ! to unless