use transaction(), remove obsolete commit()