with the extra print statements the output percentiles are correct
but remove the extra print statement and they are incorrect