add existing logic -- had lost it accidentally, recovered it somehow!
gemify