get rid of extraneous bits