Correct implementation

Done:
- Bug fixed
- Training work correct