passing struct config to function and use table parameter