refactoring gem use