small refacrtoring