renaming $f to $ft to avoid confusion with static, adding comparator override