edit lecture: add type flexibility