Refactoring adding to the table