modified test case to get profile dynamically