added reading strings, and fixed an error on linear cases.