removed refs in favor of using loop/recur