added import of 'socket' module