actually added real functionality to lessons.js/lesson.php