followed tutorial on http://www.binarytides.com/python-socket-programming-tutorial/