bean states refactory