improving java config