use channels to handle the event waiting, that way other processes can send/interrupt events too