gem refactoring - 1a