new function checkVariables, provides feedback on whether table vars are set
bug fixes
better error messaging regarding status of variables