took forever to realize getElementsByName returns an array