use MyBuffer instead of bytes.Buffer
use terminal struct to reduce repitive args