add flag for non-blocking operations