fix the bugs in get_influence_history function.
remove the print statements.