adding upload feature, and externalize html template