fix r helper