refactor for easier tables/html