It works, but I didn't write any unit tests.