added memcmp method to buffer