further changes to ftemplate.py