modified description of Algorithm 1