added copy to algorithm constructors