upgrade variable and function tables, add variables to table