add secondary sort support