https://medium.com/better-programming/how-to-extend-legacy-functions-in-javascript-without-breaking-anything-54a7ec3549b8