use gevent, add interface checking