Use right way to iterate tables instad of #