got latest event working, lots of refactoring