sorting improved, provider namespace fixed