Replaced if !'s with unless