added xmlparser and some refactoring