refactoring do statement service