buffer initialization