added update function, transaction inserts to be added still