use clear to clearbuffer