event driven mode working