added some validation for profile