add local gems
refactor operation definitions