Redesigned to use an Event structure