Added the Algorithm class