correct mistakes of outputting massages