first commit of utils_quantgen.R