making it actually detect errors.. still need to work out strict mode, but otherwise good