changed hardcoded xml to read the given inputstream