Adding $a, $b as parameters in sort
Changing behavior of reduce and sort