Gold nanowires and the effect of impurities