[confused/broken] first pass at lookup, wrong output and such will need fixup