wait command for events