added word template and fixed bugs