Somewhat workings. Lots of places to improve upon