swapped the if ! to an unless conditional statement to make it cleaner
to read.