re-arrange message handler to be clear the invoking order