refactoring some tests and removing useless test