commits the transactions