Revert "sooo ugly code that somehow works" to move this to another branch

This reverts commit c1029e2ce7e321a70c16a9052ae18a79c853fb53.