added get_profile and fixed test cases