added some additional functionality to lesson.edit