migrated from xml config to java config