add TODO: give a type to the buffer.