refactored tests in files