latest working version of smack_server script