do the correct math for a list