added a check for empty children list
oh, damn those reserved words
unification of adding commands, build update
childNodes are used, not children