fix pointer weirdness
complete scanner test