Add ftgr function for debugging purposes