Revert "a seperate function for this stuff"

This reverts commit b6e6de451b4a6bdb41fba172759d2aa3d987faa2.