added gem_logic file to controller - this will have algorithm/logic for gem