refactoring with standard rails gemset.