added index and functions files