fix broken function >r