converted from xml configuration to javaconfig