change database, adding functional cashIn, cashOut