Modified method for message input