removing extraneous lines