calculate percentiles as well