refactor bean utils