better event logging
merged getHistory function