finished Eller's algo