changes in tables  to get rid of duplicates