don't use strlen(line) when we already have that in the read variable