Yikes. I hope you have at least 5000 lines of tests to make sure it actually works with all the edge cases :P