diff --git a/HOMEWORK.md b/HOMEWORK.md
new file mode 100644
index 0000000..5bcdeb9
--- /dev/null
+++ b/HOMEWORK.md
@@ -0,0 +1,5 @@
+# Homework
+* Fixed bug with wrong array name in __3-callback.js__;
+* Now timeout in __5-timeout.js__ can be called up to 5 times;
+* Async timeout in __6-timeout.js__ can limit time for callbacks;
+* General wrapper, pause(), resume() and timeout() have been implemented in __10-wrapper-class.js__.
diff --git a/JavaScript/3-callback.js b/JavaScript/3-callback.js
index a3e440f..d8c9d6a 100644
--- a/JavaScript/3-callback.js
+++ b/JavaScript/3-callback.js
@@ -5,7 +5,7 @@
 
 // const wrapAsync = (before, after, beforeCb, afterCb, fn) =>
 //   (...args) => {
-//     const callback = arr[arr.length -1];
+//     const callback = args[args.length -1];
 //     if (typeof callback === 'function') {
 //       args[args.length - 1] = (...pars) =>
 //         afterCb(callback(...beforeCb(...pars)));
diff --git a/JavaScript/5-timeout.js b/JavaScript/5-timeout.js
index 11acd3c..bce9b4d 100644
--- a/JavaScript/5-timeout.js
+++ b/JavaScript/5-timeout.js
@@ -7,8 +7,13 @@ const timeout = (msec, fn) => {
     if (timer) console.log('Function timedout');
     timer = null;
   }, msec);
+  let callCounter = 0;
   return (...args) => {
-    if (timer) {
+    if (timer && callCounter < 4) {
+      callCounter++;
+      return fn(...args);
+    }
+    else if (timer) {
       clearTimeout(timer);
       timer = null;
       return fn(...args);
@@ -27,5 +32,10 @@ const fn200 = timeout(200, fn);
 
 setTimeout(() => {
   fn100('first');
-  fn200('second');
+  fn200('1');
+  fn200('2');
+  fn200('3');
+  fn200('4');
+  fn200('5');
+  fn200('6');
 }, 150);
diff --git a/JavaScript/6-timeout-async.js b/JavaScript/6-timeout-async.js
index 31f6392..ddf85d6 100644
--- a/JavaScript/6-timeout-async.js
+++ b/JavaScript/6-timeout-async.js
@@ -2,13 +2,29 @@
 
 // Wrapper will prevent call after timeout
 
-const timeout = (msec, fn) => {
+const timeout = (fntime, cbtime, fn) => {
   let timer = setTimeout(() => {
     if (timer) console.log('Function timedout');
     timer = null;
-  }, msec);
+  }, fntime);
   return (...args) => {
     if (timer) {
+      const callback = args[args.length - 1];
+      if (typeof callback === 'function') {
+        let cbTimer = setTimeout(() => {
+          if (cbTimer) console.log('Callback timedout');
+          cbTimer = null;
+        }, cbtime);
+
+        args[args.length - 1] = (...pars) => {
+          if (cbTimer) {
+            clearTimeout(cbTimer);
+            cbTimer = null;
+            return callback(...pars);
+          }
+        };
+      }
+
       clearTimeout(timer);
       timer = null;
       return fn(...args);
@@ -20,17 +36,21 @@ const timeout = (msec, fn) => {
 
 const fn = (par, callback) => {
   console.log('Function called, par:', par);
-  callback(null, par);
+  setTimeout(() => callback(null, par), 150);
 };
 
-const fn100 = timeout(100, fn);
-const fn200 = timeout(200, fn);
+const fn100 = timeout(100, 150, fn);
+const fn150 = timeout(150, 100, fn);
+const fn200 = timeout(200, 250, fn);
 
 setTimeout(() => {
   fn100('first', (err, data) => {
     console.log('Callback first', data);
   });
-  fn200('second', (err, data) => {
+  fn150('second', (err, data) => {
     console.log('Callback second', data);
   });
-}, 150);
+  fn200('third', (err, data) => {
+    console.log('Callback third', data);
+  });
+}, 100);
diff --git a/JavaScript/d-wrapper-class.js b/JavaScript/d-wrapper-class.js
new file mode 100644
index 0000000..7eab45d
--- /dev/null
+++ b/JavaScript/d-wrapper-class.js
@@ -0,0 +1,59 @@
+'use strict';
+
+class Wrapper {
+  constructor(limit, fn) {
+    this.count = limit;
+    this.calls = 0;
+    this.pause = false;
+    this.fn = fn;
+    this.timedout = false;
+  }
+
+  call(...args) {
+    if (this.timedout) return;
+    if (this.calls === this.count) throw new Error('Limit reached');
+    else if (!this.pause) {
+      this.calls++;
+      return this.fn(...args);
+    }
+  }
+
+  stop() {
+    if (this.pause) this.pause = false;
+    else this.pause = true;
+    return this;
+  }
+
+  timeout(msec) {
+    let timer = setTimeout(() => {
+      if (timer) {
+        timer = null;
+        console.log('Function timedout');
+        this.timedout = true;
+      }
+    }, msec);
+    return this;
+  }
+
+  print() {
+    console.log(`Calls: ${this.calls}\nFunction: ${this.fn}`);
+    return this;
+  }
+}
+
+//USAGE
+
+const fn = par => {
+  console.log('Function called, par:', par);
+};
+
+const fnLim = new Wrapper(3, fn);
+fnLim.call(1);
+fnLim.print();
+fnLim.stop();
+fnLim.call(2);
+fnLim
+  .stop()
+  .timeout(100);
+setTimeout(() => fnLim.call(3), 150);
+fnLim.call(4);