refactory class