updated gems, refactoring