separated code and added DNS lookup
removed pyc