streaming quantile computation

also cleaned up some formatting