built javascript to handle lessons index filtering by student/teacher interest