refactored socialHistory minimally and added test