Allow specification of algorithm to run