changed printProfile() method