adding xml support, no more hardcoded nonsense