refactor gem file