update class to use spring bean