It took me a bit to wrap my head around this, but I like how you've done this--it's very simple and consistent!