Revert "no need to reinvent the wheel"

This reverts commit 158ad2677038bcc02e3e0710d4b69ec1eb055616.