added in buffer writing method skeleton