fixed getChild bug, added some more features