readded config to DataConnection and fixed a crappy loop