RF: consolidate code of extensions