work in progress, add functions to create dynamic categorized layer dialog