Added simple lookup logic... Won't work for anything crazy, I think