added sorting by status code