add nonblocking mode