small refatoring