fixed parsing error, considers complexity of children in computing complexity