have this been implemented from scratch or copy/pasted + adopted? If later what about the licence + would be nice to mention the source here.