listIndex output improvement