trying to figure out js issues