added buffered message IO