added code to create 'system' table if needed.