doctype handling