open and close index added