switched from xml to java config