buffer should set to 1KB