dont use global

1st as long as $rcv is not sed anywhere else there is no reason to define it outside the function
2nd when you need it outside, pass it as an argument and you are off global as well