refactor bean