add code for manual entry connections.
remove unneeded debug code.