refactoring methods, gem development