refactoring
add chech if node exists function
remove trashes
remove trashes
fix performance