Inspired by original code (MIT license) written in 2016 by Keurfon Luu (keurfonluu@outlook.com) https://github.com/keurfonluu/Forlab