algorithm class structure mod