removing unnecessary newline check