added index to the tables