added proper template, fx declarations at top of .tex file