add templates and database