adding to the table correctly