Sorry, I had missed the thing that "connection" was actually used there, it is better indeed to pass it than to have it as a global object, could I kindly ask you to put it back as a parameter? :)