adding index and img