use template replace connection.cc