gem refactoring - 1