refactored table reset