fixes and connectionOutIn + tests