add Loader class
writing loading from xml