added writeback and some accounting