Adding index and main