edit lesson function