updated code for template and stylesheet