added optional initial buffer setup