removing extraneous statements