added algorithm class