added sorting of fact fields  and action params