Edit function added (together with example template)