small refectoring