added history function to Engine class