setting up variables and updating nabbers, tables, buttons