a little style consistency with error checking
don't assign variables in if() that's not error checking