Refactored the table to be able to update the table dynamically