switch to if since there's two checks