added example that calls nc_genslice