help function to create profiles from templates