idiot savant version, bypassed quite a bit of code