Added in writing properly, just needs linking to state