added connectionManager
added tests