Implemented a getProfile() method