updated code for memory usage and optimized receiver code
missed file