refactoring test suite for doctor