#6 added algorithm constructor that sets the appropriate algorithm types, based on the implemented interfaces