Added profiles to the logic