more refactoring
Add guard for auto test
refactoring