refactored gems file