be more selective about receive_data loop