refatoring tests