add code to {alg}