add correct sorting