cleaned up code
moved to urllib2