replace variable id to fid (id() is a built-in function)