a bit of cleanup insanity