I updated this to be compatible with the latest event machine