add strip whitespace characters before parsing messages