added the deleted lines on fetchProfileInfo function