make 'r' and 'f' cleverer