built check that stops program after everything is found
removed unneccessary nodes