[FIX] change connection management
[FIX] tests according to new interface