KAZOO-2661: keep this part of the pull request, I tried to keep the history but was unable to.  Full credit to jxiewei