refactor some beans