added index and main