why we are using eventloop and how to use eventloop..give simple example