handles init. of connection better.