simplifying statfn resolution and improving test run