ADded constant MAX_BUF