check buffer