Refactored helper for lesson