He undertook certain administrative tasks for example he was chairman of the department from 1936 to 1945

Could you correct the punctuation please?
He undertook certain administrative tasks, for example he was chairman of the department from 1936 to 1945.