added code for getChildren