update gems
close magic
refactoring
refactoring