updated psk, modified nonblocking, added detatch to threaded