added mote logic and tests to events.