On the surface this looks a bit complex, but it's understandable. Prettier would be better.