code refactory.