first draft of db and template plugins