Use model instead of reading xml manually