remove error check
update alg init method