WORKING STATE

Not very efficient and I've done no optimizing yet.