added definitions for buffer-equal