algorithm class structure modified