adding sort to topics by first element order