remove some dupe and extraneous code