initialize buffer