order events correctly