Declare connector for the function, and do not reuse global