finish MessageInputCore.py