Modifications so this works with the latest event format