trimming messages, closes #45