add non-blocking mode