remove extraneous lines