Added filterProfileData function.