The role of teacher quality in education production