refatoring validation