move config into global struct