add algorithm encoding