passing data and unversioned states to recursive functions, Fixes #8