slight clean up in the lines that check for node density