Tasks in a pedagogical context :integrating theory and practice