Rewrite FP functions