remove duplication in test