add invoke function for client