refacoring tests