Refactor the old code only for receiveexecutor. Do it always for others also