initialize stack with most left expandable index