better input for sorting programs