small refactory