prepare testing
small refactoring for testing