change hardcode html to templates