wrote the Profile class and a method to save profiles to txt