convert closures to lazies, so we can serialize later