created loop for table view

created loop for table view