This really deserves a test.