add non-recursive version