Revert "Revert "this code just doesn't work and isn't needed anyway""

This reverts commit 0140fec4e9311969ad6c4431e5476d79cebe73c6.