Basic logic laid out, doesn't quite work yet