stubs refactoring