pruning extraneous code