made the tables global
fixed merge conflicts