misc test code for functional (or other) programming