add ruby refactoring