added rf api. will tweak later