Proper fts function implementation