some minor changes in main and receiver