Teaching and learning with generative AI