cope with empty params
factor kernelud into separate r file