cleaned up hardcoding of table reading