improve next array