Data sort script