Using generics
Encoding/decoding node's name in case of error