adding changes to use freemarker