added index to galleries