Refactored further to remove the auxiliary list of doubles, to allow
single input list to be evaluated