improvement on templates and styles