add create_connection_withdata function