[TASK] Code refactor, documentation and added 3 new cases to the example