The role of writing in student engagement and learning