SendCode refactoring