Now working with nonBlocking function