Well, since you don't say what $RV is to begin with and you don't say what your result is vs. the expected result, what are we to suggest?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.