added require statement for buffer