changed navigation class to work more like the xml class when adding children