fixed typos, now compiles...
improved line following