modify the ftl
refactor code