refactored adding of tests