added path history and actual prediction function