tweaks to custom_function, also more informative template