fixes to allow more types of algorithms