fix bugs and add result template