write cashout after reading cashin