make functions function accept connection objects again