implemented indexing for node names
implemented switch query
updated api
fixed switch query bug
refactored recursive methods query