more refactoring
add quantiles and moving-quantiles