updates html in js to match current table