nicer error handling with check macro.
symbol table should check its size