Updated the gremlin function logic

Fixed the percentage stuff in the gremlin function.