reworked buffer and messages