template for latmos local functions added