add tables, many fixes