Add transfer() utility function.