init total sort