gem refactoring - 1d