change xml config to java based config