checking in before a change in strategy to simplify implementation a bit
fully working version, simplified.
combined connection stuff into a single module. now simplified to death