updated templates to be more pythonic