apparently js did not like my attempt at cleaner syntax, one line it is