removing extraneous code