attaching callback directly to connection object