added calendar template and some database interface