modified table update method(currently working as expected)