updating code in history and send money