finalized file that calculates balance and updated csv