added tests and validation for profile_name correctness