finish building out js, still need to debug