changed childElement to subElement, made some changes