Changed how extra values are pushed to visited