Barrowing some open source code and documented the authors