* added checks for listen and send