indent with 2 spaces and clean code
add test for nested undef path
support nested undef