sorted input data