eliminated extraneous clearing of variables