how to write an md thesis