refactored bean