refactored some tests