Modified initialization of algorest