Redid code for table 1