dont need to pass filename to getnonblankline or doif x)